#ifndef __HELP__
#define __HELP__

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>

#define outLineLength 16
#define LABLE_MAX_LENGTH 30
#define ERROR -1
#define DBG_OUT(str) /*if (_DEBUG_)*/ printf("%s", str)

enum {false, true};

/* open file wich the name "name" and end wich needToAdd */
FILE *openFile(char *name,char *needToAdd, char *mode);

/* change to error mode */
void do_error(char *st, int line);

/* change to error mode */
void do_lable_error(char *lable);

/* change to error mode */
void do_ent_error(char *lable, int line);

/* change to un error mode */
void undo_error();

/* check if error mode */
int check_error();

/* return a array at length "outLineLength" that represent "n" in binary  */
char *toCharArray(int n);

/* print line at base 4
 * line: binary line at length "outLineLength" that need to be printed
 * fp: the file that line will be printed at */
void printLineAt4Base(char *line, FILE *fp);

/* remove the file */
void removeFile(char *name, char *needToAdd);

/* check if string is legal number */
int is_single_number(const char *p);

#endif /* __HELP__ */
